
 /**
 * DeleteAction.java.java.
 * User: BrianChen Date: 2012-2-20 上午08:16:36
 *
 * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
 * All rights reserved.
 */
package com.collapsar.snail.user.action;

import com.collapsar.core.action.BaseStrutsAction;
import com.collapsar.core.security.service.IUserManager;


/**
 * <pre>
 * REVISIONS: 
 * Version 	Date 		Author 			Description
 * ------------------------------------------------------------------- 
 * 1.0 		2012-2-20 	BrianChen 	1. Created this class. 
 * </pre>
 * 
 * @author BrianChen
 * @date 2012-2-20 上午08:16:36
 * @version 1.0
 * @see
 * 
 */
@SuppressWarnings("serial")
public class DeleteAction extends BaseStrutsAction{
	private IUserManager userManager = null;

	
	
	
	@Override
	public String execute() throws Exception {
		String idStr = this.request.getParameter("id");
		logger.info("###userId="+idStr);
		if(idStr == null){
			return null;
		}
		Long id = Long.parseLong(idStr);
		boolean success = this.getUserManager().deleteUser(id);
		if(success){
			return "toQueryListAction";
		}else{
			return null;
		}
	}




	public IUserManager getUserManager() {
		return userManager;
	}

	public void setUserManager(IUserManager userManager) {
		this.userManager = userManager;
	}

}

